Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

DialogList and @DbLookup
~Tanita Chugerobergflar 01/28/2004 02:28 AM
Notes Client 6.5 Windows 2000


I have a field within a form that is a DialogList Type field. This field uses formula to obtain the choices. The formula is:

SRepID:=@GetProfileField ("DBProfile"; "SouvDBRepID") ;
view := "BDKeywords";
column := 2;

tmpDbLookup := @DbLookup ("":"NoCache"; SRepID; view; CompanyType; column);

@If (tmpDbLookup != ""; tmpDbLookup; "No Client names available. See administrator.")

This code, as means of an explanation, looks up the SOUVENIR Database (a Contact Database), using a categorised view ("BDKeywords") based on the CompanyType. The values being "Client", "Construction", "Consultant", and "Operator". Within the SOUVENIR database there could be multiple contacts associated to a Company within a category. I am trying to retrieve the Company Name for this field. However, the DbLookup is returning multiple entries for a company where there are multiple contacts. That is, the company Bovis Lend Lease has four contacts associated with the company in the SOUVENIR Database. The DbLookup returns all four entries.

I have used @Unique (tmpDbLookup) and @Unique (@DbLookup (xxx) where xxx = required parameters) with no success.

The odd thing is that there is an entry of a company with two contacts under the category of "Client" and the lookup retrieves only one. However, this is not the case for "Construction", "Consultant", "Operator" where there are multiple contacts for a company.

Can anyone suggest a possible solution, thank you.

Barry Eddy

Go back